Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Functions That Modify Movie Properties / Working With Media Samples


SetMediaSampleDescription

The SetMediaSampleDescription function lets you change the contents of a particular sample description of a specified media.

pascal OSErr SetMediaSampleDescription (Media theMedia, 
                                        long index,
                                  SampleDescriptionHandle descH);
theMedia
Specifies the media for this operation. You obtain this media identifier from such Movie Toolbox functions as NewTrackMedia and GetTrackMedia (described on page 2-138 and page 2-190, respectively).
index
Specifies the index of the sample description to be changed. This index corresponds to the sample description itself, not the samples in the media. This long integer must be between 1 and the largest sample description index.
descH
Specifies the handle to the sample description. If there is no description for the specified index, the function returns this handle unchanged.
DESCRIPTION
The SetMediaSampleDescription function can be useful in the case of a media handler, such as a text media handler, that stores playback information in its sample description, as opposed to just data format information (as in the case of the video media handler). For more on media handlers, see Inside Macintosh: QuickTime Components.

SPECIAL CONSIDERATIONS
Because a sample description structure may define the format of the data, you should not assume the description describes the data. You should use this function only on an inactive track.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996